<html><head><title>WriteCharacter</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">WriteCharacter()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#3A3966"><b>WriteCharacter</b></font>(#File, Character.c [, Format])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Write a character number (1 byte in ASCII, 2 bytes in <a href="../reference/unicode.html">unicode</a>) to a file. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#File</i></td>
<td width="90%"> 
The file to write to. 

</td></tr>
<tr><td><i>Character</i></td>
<td> 
The character value to write. 

</td></tr>
<tr><td><i>Format (optional)</i></td>
<td> 
The format of the character to write. It can be one of the following value: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Ascii</font>  : 1 byte character (default in ASCII mode).
  <font color="#924B72">#PB_Unicode</font>: 2 bytes character (default in <a href="../reference/unicode.html">unicode</a> mode).
  <font color="#924B72">#PB_UTF8</font>   : multi-bytes character (from 1 to 4 bytes).
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Returns nonzero if the operation was successful or zero if it failed. 

</blockquote><p><b>Remarks</b></p><blockquote>

Because of <a href="filebufferssize.html">file buffering</a>, this function may return successful even if there is not enough 
space left on the output device for the write operation. 
The file must be opened using a write-capable function (i.e. not with <a href="readfile.html">ReadFile()</a>). 

<br>
<br>
For an example see the <a href="createfile.html">CreateFile()</a> function - with WriteCharacter() only a character number is written, instead of a string. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="readcharacter.html">ReadCharacter()</a>, <a href="writeasciicharacter.html">WriteAsciiCharacter()</a>, <a href="writeunicodecharacter.html">WriteUnicodeCharacter()</a>, <a href="createfile.html">CreateFile()</a>, <a href="openfile.html">OpenFile()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=writebyte.html>WriteByte()</a> - <a href="index.html">File Index</a> - <a href="writedata.html">WriteData()</a> -><br><br>

</body></html>